package com.ruoyi.dynamic.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.pojo.result.Pages;
import com.ruoyi.dynamic.model.pojo.entity.RoomVoteMusic;
import com.ruoyi.dynamic.model.pojo.entity.RoomVoteMusicResource;
import com.ruoyi.dynamic.model.pojo.request.app.*;
import com.ruoyi.dynamic.model.pojo.result.app.AppRoomVoteMusicResult;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Gnc
 * @since 2025-01-04
 */
public interface IRoomVoteMusicService extends IService<RoomVoteMusic> {

    /**
     * 发起投票
     */
    boolean create(Long userId, AppRoomVoteMusicAddRequest request);

    /**
     * 投票历史
     */
    Pages<AppRoomVoteMusicResult> listPage(AppRoomVoteSearchRequest request, Long userId);

    /**
     * 详情
     */
    AppRoomVoteMusicResult info(Long id, Long userId);

    /**
     * 详情
     */
    AppRoomVoteMusicResult getInfo(RoomVoteMusic record, Long userId);


    RoomVoteMusic verify(Long id);


    /**
     * 结束投票
     */
    boolean over(AppRoomVoteMusicOverRequest request, Long userId);

    /**
     * 开始投票
     */
    boolean start(AppRoomVoteMusicStartRequest request, Long userId);

    /**
     * 投票历史保存模板
     */
    boolean saveTem(Long id, Long userId);

    /**
     * 获取房间投票场次记录
     */
    List<RoomVoteMusicResource> getRoomVoteMusicList(Long roomId, Long voteMusicId);

    /**
     * 投票结束
     */
    void voteOver(String replace, Integer status);

    /**
     * 使用模板发起投票
     */
    boolean templateCreate(Long userId, AppRoomVoteMusicTemRequest request);

    /**
     * 取消投票模板
     */
    boolean removeTem(Long id);

    /**
     * 修改模板
     */
    boolean updateTem(Long userId, AppRoomVoteMusicUpdateRequest request);

}
